From: Florian Müllner Date: Sat, 4 Jul 2020 00:22:10 +0000 (+0200) Subject: keyboard: Fix setting height in portrait orientation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~174 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1e72874192d16e9063c7a4766e53f53dfd6d130e;p=gnome-shell.git keyboard: Fix setting height in portrait orientation get_preferred_height() returns both the minimum and natural height, not a single size. Math.min() doesn't handle that and returns NaN, whoops. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349 --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 7df7ef16d..62df5922f 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1608,7 +1608,8 @@ class Keyboard extends St.BoxLayout { * we allow the OSK being smaller than 1/3rd of the monitor height * there. */ - this.height = Math.min(maxHeight, this.get_preferred_height(monitor.width)); + const [, natHeight] = this.get_preferred_height(monitor.width); + this.height = Math.min(maxHeight, natHeight); } }